package com.stylefeng.guns.rest.modular.wz.api.v1;


import com.baomidou.mybatisplus.mapper.Condition;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.rest.common.base.controller.ApiBaseController;
import com.stylefeng.guns.rest.common.constant.Consts;
import com.stylefeng.guns.rest.common.exception.BizExceptionEnum;
import com.stylefeng.guns.rest.common.exception.ParamException;
import com.stylefeng.guns.rest.common.persistence.dao.*;
import com.stylefeng.guns.rest.common.persistence.model.*;
import com.stylefeng.guns.rest.common.util.StringUtils;
import com.stylefeng.guns.rest.domain.ParamMap;
import com.stylefeng.guns.rest.domain.Res;
import com.stylefeng.guns.rest.enums.EnWzAdv;
import com.stylefeng.guns.rest.enums.EnWzUser;
import com.stylefeng.guns.rest.enums.EnWzUserFinanceRecord;
import com.stylefeng.guns.rest.modular.auth.util.JwtTokenUtil;
import com.stylefeng.guns.rest.modular.wz.cache.CacheService;
import com.stylefeng.guns.rest.modular.wz.controller.AsyncService;
import com.stylefeng.guns.rest.modular.wz.service.impl.WzAdvServiceImpl;
import com.stylefeng.guns.rest.modular.wz.service.impl.WzAnswerServiceImpl;
import com.stylefeng.guns.rest.modular.wz.service.impl.WzUserQuestionnaireServiceImpl;
import com.stylefeng.guns.rest.modular.wz.util.wz.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.*;

/**
 * <p>
 * 广告表 前端控制器
 * </p>
 *
 * @author ruiyifeng123
 * @since 2018-03-20
 */
@RestController
@RequestMapping("/wz/api/v1/adv/")
public class WzAdvApi extends ApiBaseController {

    @Autowired
    private WzQuestionMapper questionMapper;
    @Autowired
    private WzAnswerMapper answerMapper;
    @Autowired
    private WzAdvMapper advMapper;
    @Autowired
    private WzUserInfoMapper userInfoMapper;
    @Autowired
    private WzCouponMapper couponMapper;
    @Autowired
    private JwtTokenUtil jwtTokenUtil;
    @Autowired
    private WzUserCouponMapper userCouponMapper;
    @Autowired
    private WzUserMapper userMapper;
    @Autowired
    private WzUserQuestionnaireMapper userQuestionnaireMapper;
    @Autowired
    private WzUserFinanceRecordMapper userFinanceRecordMapper;
    @Autowired
    private WzAdvServiceImpl advService;
    @Autowired
    private WzUserAdvRecordMapper userAdvRecordMapper;
    @Autowired
    private WzQuestionnaireMapper questionnaireMapper;
    @Autowired
    private WzUserAdvCollectionMapper userAdvCollectionMapper;
    @Autowired
    private WzAdvUserMapper advUserMapper;
    @Autowired
    private WzAdvCommentMapper advCommentMapper;
    @Autowired
    private PfOpenCityMapper openCityMapper;
    @Autowired
    private PfReportMapper reportMapper;
    @Autowired
    private PfFinanceRecordMapper pfFinanceRecordMapper;
    @Autowired
    private CacheService cacheService;
    @Autowired
    private AsyncService asyncService;
    @Autowired
    private WzUserQuestionnaireServiceImpl userQuestionnaireService;
    @Autowired
    private WzAnswerServiceImpl answerService;
    @Autowired
    private WzRedpacketMapper redpacketMapper;
    @Autowired
    private WzMessageMapper messageMapper;

    /**
     * 广告详情
     */
    @PostMapping("advDetail")
    public Res advDetail(@RequestBody ParamMap paramMap){
        //业务处理
        Res res = advService.advDetail(paramMap);
        return res;
    }
}

